package com.alibaba.algo.constants;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
import org.springframework.util.ObjectUtils;

/**
 * @ClassName OrgConstants
 * @Description 根节点配置
 * @Author wangke
 * @Date 2021/11/16 21:29
 */

@Component
public class OrgConstants {

    //根节点id 商飞根节点---id:0; parentId:-1; name:中国商飞; code:00;
    public static Long ROOT_ORG_ID;

    @Autowired
    public OrgConstants(@Value("${org.parentId:-1}") String rootOrgId) {
            OrgConstants.ROOT_ORG_ID = Long.valueOf(rootOrgId);
    }
}
